<#include "../../select.ftl" />
<#assign shmsConstant = statics["cn.hfatec.shms.constants.ShmsConstant"]/>
<!-- Modal -->
<div class="modal-dialog wide" style="width: 550px;">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title" id="myModalLabel">
            <#if ykManage??>
                <#if ykManage.id??>
                    编辑
                <#else>
                    新增
                </#if>
            </#if>
            </h4>
        </div>
        <div class="modal-body">
            <div id="errorMessage"><#include "../../message.ftl" /></div>
            <form class="form-horizontal" role="form" id="ykManageForm" method="post"
                  action="${absoluteContextPath}/members/ykManage/saveUserNameFg">

                <input type="hidden" name="ids" value="${ids}"/>


                <div class="form-group col-md-12">
                    <label class="col-sm-4 control-label">分管人</label>

                    <div class="col-sm-6">
                        <div class="input-group">
                            <input name="userNameFg" value="${ykManage.userNameFg!''}" type="text"
                                   class="form-control"
                                   readonly="true"/>
                            <input name="healthFg" id="healthFg2" value="${ykManage.healthFg!''}"
                                   type="hidden" class="form-control">
                                <span class="input-group-addon" onclick="doSelctReferralsUser(this);"><i
                                        class="fa fa-search"></i></span>
                        </div>
                    </div>

                </div>


        </div>
        </form>

        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
            <button type="button" class="btn btn-primary" onclick="save();">保存</button>
        </div>
    </div>
</div>
<script>

    function save() {
        $("#" + "ykManageForm").ajaxSubmit({
            success: function (data) {
                data = JSON.parse(data);
                if (data.returnCode == 1) {
                    $('#myModal').modal("hide");
                    $.showMessage({parentId: "showMessage", message: "信息保存成功！", type: "success"});
                    refreshTable();
                } else {
                    $.showMessage({parentId: "errorMessage", message: "<strong>错误信息</strong>：" + data.returnMsg, type: "error"});
                }
            }
        });
    }

</script>